<h1>Detail Bonus Prestasi Warehouse</h1>
<br />
<?php
$this->renderPartial('application.modules.member.views.main.info');
?>
<br />
<div class="list">
    <table id="data-table" cellpadding="2" style="border:1px solid #999;">
        <tr>
            <th width="150">Generasi</th>
            <th>Bonus</th>
        </tr>
        <?php
        $total_bonus = 0;
        foreach ($data as $row) {
            echo '<tr>';
            echo '<td>Generasi ' . ($row['gen_node_extra_warehouse_bonus_log_level_depth'] + 1) . '</td>';
            echo '<td align="right">' . number_format($row['gen_node_extra_warehouse_bonus_value']) . '</td>';
            echo '</tr>';
            $total_bonus += $row['gen_node_extra_warehouse_bonus_value'];
        }
        if ($total_bonus == 0) {
            echo '<tr><td colspan="2" align="center">-----====-----</td></tr>';
        }
        ?>
        <tr>
            <th style="text-align:right;"><strong>TOTAL</strong></th>
            <th style="text-align:right;"><strong><?php echo number_format($total_bonus); ?></strong></th>
        </tr>
    </table>
</div>